package com.gll.service.impl;

import com.gll.dao.ProductMapper;
import com.gll.pojo.Pagination;
import com.gll.pojo.Product;
import com.gll.service.ProductService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class ProductServiceImpl implements ProductService{

    private ProductMapper productMapper;

    @Override
    public List<Product> selProduct(Pagination<Product> pagination) {
        List<Product> products = productMapper.selProduct(pagination);
        return products;
    }

    @Override
    public long selCount(Pagination<Product> page) {
        return productMapper.selCount(page);
    }

    @Autowired
    public void setProductMapper(ProductMapper productMapper) {
        this.productMapper = productMapper;
    }


}
